void main() {
List goodsList = [
  {"id": 1, "name": "西瓜", "price": 22.68, "selectd": true},
  {"id": 2, "name": "草莓", "price": 11.99, "selected": true},
  {"id": 3, "name": "桃子", "price": 10.99, "selected": true},
  {
    "id": 3, 
    "name": "桃子", 
    "price": 10.99, 
    "count": 3,
    "selected": false
    },
    {
    "id": 4, 
    "name": "车厘子", 
    "price": 60.99, 
    "count": 3,
    "selected": false
    },
];

double allValue = goodsList.where((item) => item['selected']).fold(
  0.0,(value,element) => value + element["count"] + element["price"]);
print(allValue);
}

